<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
	<div id="acd" class="easyui-accordion" data-options="fit:true">
		<div title="菜单权限">
			<ul id="power_edit_tree" class="easyui-tree" data-options="url:'system/role/getPowerMenu.do?roleId=${roleId }',checkbox:true,onCheck:onNodeCheck,cascadeCheck:false"></ul>
		</div>
		<div title="其它权限"></div>
	</div>
	<script type="text/javascript">
		function onNodeCheck(node,checked) {
			$.ajax({
				type : 'POST',
				dataType : 'JSON',
				data : {"menuId":node.id,"roleId":${roleId},"checked":checked},
				url : "system/role/updateMenuPower.do",
				success : function(data) {
					$.messager.show({
						title:'提示信息',
						msg:data.msg,
						timeout:2000,
						showType:'slide'
					});
				}
			});
		}
	</script>
</body>
</html>
